package bishihuizong;

import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Register {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while (scanner.hasNext()){
            String name=scanner.nextLine();
            if (name=="zhangsan"||name=="lisi"){
                System.out.println("该用户名已存在");
                scanner.close();
            }
            String pwd=scanner.nextLine();
            Pattern Password_Pattern = Pattern.compile("^(?=.*[0-9])(?=.*[a-zA-Z])(.{8,16})$");
            Matcher matcher = Password_Pattern.matcher(pwd);
            if (!matcher.matches()){
                System.out.println("密码格式错误");
                scanner.close();
            }
            String phone=scanner.nextLine();
            char[] chars=phone.toCharArray();
            if (phone.length()!=11||chars[0]!='1'){
                System.out.println("请输入正确的手机号码");
                scanner.close();
            }
            System.out.println("注册成功");
        }
    }
}